package com.boot.web.serviceImpl;

import com.boot.web.dao.RolePowerDao;
import com.boot.web.entity.RolePower;
import com.boot.web.service.RolePowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.boot.base.serviceImpl.BaseServiceImpl;

import java.util.List;

/**
 * 角色与权限关系信息业务层接口实现
 * @author 【zhouJie】
 * @date 2019-12-05 17:31:35
 */
@Service
public class RolePowerServiceImpl extends BaseServiceImpl<RolePower> implements RolePowerService {

    @Autowired
    private RolePowerDao rolePowerDao;

    @Override
    public List<RolePower> getRolePowerByRoleId(Integer roleId) {
        return rolePowerDao.queryRolePowerByRoleId(roleId);
    }

    @Override
    public List<RolePower> getRolePowerByPowerId(Integer powerId) {
        return rolePowerDao.queryRolePowerByPowerId(powerId);
    }

    @Override
    public int batchDeleteByPowerId(Integer[] ids) {
        return rolePowerDao.batchDeleteByPowerId(ids);
    }
}
